<template>
	<view :style="themeColor">
		<view class="page">
			<view
				class="flex flex-wrap align-center justify-between benben-position-layout flex recordPrize_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }"
			>
				<view
					class='flex flex-wrap align-center recordPrize_fd0_0'
					@tap.stop="handleJumpDiy"
					data-type="back"
					data-url="1"
				>
					<image
						class='recordPrize_fd0_0_c0'
						mode="aspectFit"
						:src='STATIC_URL+"234.png"'
					></image>
				</view>
				<text
					class='recordPrize_fd0_1'
					style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;"
				>奖品纪录</text>
				<view class='flex flex-wrap align-center recordPrize_fd0_0'>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout">
				<view>
					<benben-flex-tabs
						class-name='recordPrize_benbenTabsfd1_0'
						v-model="tabs"
						ref="benben_tabsfd1_0"
						select-mark="benben_tabsfd1_0"
						key="benben_tabsfd1_0"
						:open-title-type='false'
						:open-sticky='true'
						:top='0'
						:is-show-content='false'
						:scrollspy='false'
						:tabs-info.sync="tabsInfofd1_0"
						@change="prizesRecordFunc()"
					>

						<scroll-view
							@scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft"
							id="benben_tabsfd1_0"
							class="benben-tabs"
							style="width:750rpx"
							:scroll-x="true"
							:scroll-left.sync="tabsInfofd1_0.moveX"
							scroll-with-animation="all .3s ease"
						>
							<view
								class="benben-tabs-content"
								id="benben_tabsfd1_0-content"
							>
								<view
									id="benben_tabsfd1_0-title"
									class="benben-tabs-title flex flex align-center justify-around"
								>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '0', 'flex flex-wrap align-center': true }"
										@tap="tabs = '0'"
										:id="`benben_tabsfd1_0-title-item-${'0'}`"
									>

										<text class='recordPrize_titleItemfd1_0_c3_c0'>全部</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '4', 'flex flex-wrap align-center': true }"
										@tap="tabs = '4'"
										:id="`benben_tabsfd1_0-title-item-${'4'}`"
									>

										<text class='recordPrize_titleItemfd1_0_c3_c0'>积分</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center': true }"
										@tap="tabs = '2'"
										:id="`benben_tabsfd1_0-title-item-${'2'}`"
									>

										<text class='recordPrize_titleItemfd1_0_c3_c0'>优惠券</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center': true }"
										@tap="tabs = '1'"
										:id="`benben_tabsfd1_0-title-item-${'1'}`"
									>

										<text class='recordPrize_titleItemfd1_0_c3_c0'>实物</text>

									</view>
								</view>
								<view
									:style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
									id="benben_tabsfd1_0-line"
									class="benben-tabs-line flex benben-flex-tabs-line recordPrize_linefd1_0"
								></view>
							</view>
						</scroll-view>

					</benben-flex-tabs>

				</view>
				<view class='flex flex-direction align-stretch recordPrize_fd1_1'>
					<template v-for='(item,key0) in dataMessage'>
						<view
							class='flex flex-wrap align-center'
							:key='key0'
						>
							<view class='flex flex-direction flex-wrap align-stretch flex-sub recordPrize_fd1_1_c0_c0'>
								<view class='flex flex-wrap align-center recordPrize_fd1_1_c0_c0_c0'>
									<text class='recordPrize_fd1_1_c0_c0_c0_c0'>抽到</text>
									<text class='recordPrize_fd1_1_c0_c0_c0_c1'>{{item.details_name}}</text>
									<text
										class='recordPrize_fd1_1_c0_c0_c0_c2'
										v-if="item.type=='2'"
									>已发放至我的优惠券</text><text
										class='recordPrize_fd1_1_c0_c0_c0_c2'
										v-if="item.type=='4'"
									>已发放至积分账户</text>
								</view>
								<text class='recordPrize_fd1_1_c0_c0_c1'>{{item.create_time}}</text>
							</view>
							<button
								class='recordPrize_fd1_1_c0_c1'
								@tap.stop="getShopinfoFunc(item)"
								v-if="item.is_button=='1'"
							>申请邮寄</button><button
								class='recordPrize_fd1_1_c0_c1_1'
								@tap.stop="handleJumpDiy"
								data-type="navigateTo"
								:data-url="`/pages/ddgl/logisticsCheck/logisticsCheck?order_id=${item.id}`"
								v-if=" item.is_express!='' && item.is_express!=0"
							>查看物流</button>
						</view>
					</template>
					<fu-empty
						:pagingListLoadedAll="pagingListLoadedAll"
						:pagingListNoListData="pagingListNoListData"
						:listDataLength="listDataLength"
						:isLoadInit="isLoadInit"
					></fu-empty>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<benben-popup
				v-model="popupShow1679879039621"
				:mask="true"
				:mask-close-able="true"
				mode='bottom'
			>
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout recordPrize_flex_2">
					<view class='flex flex-wrap align-center justify-center recordPrize_fd2_0'>
						<image
							class='recordPrize_fd2_0_c0'
							mode="aspectFit"
							:src='STATIC_URL+"127.png"'
						></image>
						<text class='recordPrize_fd2_0_c1'>申请发货</text>
						<image
							class='recordPrize_fd2_0_c0'
							mode="aspectFit"
							:src='STATIC_URL+"128.png"'
						></image>
						<image
							class='recordPrize_fd2_0_c3'
							mode="aspectFit"
							:src='STATIC_URL+"131.png"'
							@tap.stop="popupShow1679879039621=false"
						></image>
					</view>
					<view class='flex flex-direction flex-wrap align-center recordPrize_fd2_1'>
						<image
							class='recordPrize_fd2_1_c0'
							mode="aspectFit"
							:src='shopinfo.details_img'
						></image>
						<text class='recordPrize_fd2_1_c1'>{{shopinfo.details_name}}</text>
					</view>
					<view class='flex flex-direction flex-wrap align-stretch'>
						<text class='recordPrize_fd2_1_c1'>收货地址</text>
						<view
							class='flex flex-wrap align-center recordPrize_fd2_2_c1'
							@tap.stop="handleJumpDiy"
							data-type="navigateTo"
							:data-url="`/pages/yhq/address/address?is_change=1`"
						>
							<image
								class='recordPrize_fd2_2_c1_c0'
								mode="aspectFit"
								:src='STATIC_URL+"139.png"'
							></image>
							<view class='flex flex-direction flex-wrap align-stretch flex-sub recordPrize_fd2_2_c1_c1'>
								<view class='flex flex-wrap align-center recordPrize_fd2_2_c1_c1_c0'>
									<view class='flex flex-wrap align-center recordPrize_fd2_2_c1_c1_c0_c0'>
										<text class='recordPrize_fd2_2_c1_c1_c0_c0_c0'>{{addressMessage.label_name}}</text>
									</view>
									<text class='recordPrize_fd2_2_c1_c1_c0_c1'>{{addressMessage.real_name}}</text>
									<text class='recordPrize_fd2_1_c1'>(</text>
									<text
										class='recordPrize_fd2_1_c1'
										v-if="addressMessage.sex=='1'"
									>先生</text><text
										class='recordPrize_fd2_1_c1'
										v-if="addressMessage.sex!='1'"
									>女士</text>
									<text class='recordPrize_fd2_1_c1'>)</text>
									<text class='recordPrize_fd2_2_c1_c1_c0_c5'>{{addressMessage.mobile}}</text>
								</view>
								<view>
									<text class='recordPrize_fd2_2_c1_c1_c1_c0'>{{addressMessage.province}}</text>
									<text class='recordPrize_fd2_2_c1_c1_c1_c0'>{{addressMessage.city}}</text>
									<text class='recordPrize_fd2_2_c1_c1_c1_c0'>{{addressMessage.district}}</text>
									<text class='recordPrize_fd2_2_c1_c1_c1_c0'>{{addressMessage.detail}}</text>
								</view>
							</view>
							<image
								class='recordPrize_fd2_2_c1_c2'
								mode="aspectFit"
								:src='STATIC_URL+"285.png"'
							></image>
						</view>
					</view>
					<button
						class='recordPrize_fd2_3'
						@tap.stop="shenqingyoujiFunc()"
					>申请邮寄</button>
				</view>

				<!---flex布局flex布局结束-->

			</benben-popup>
			<benben-popup
				v-model="popupShow1679879191859"
				:mask="true"
				:mask-close-able="true"
				mode='center'
			>
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout recordPrize_flex_3">
					<view class='flex flex-direction flex-wrap align-stretch recordPrize_fd3_0'>
						<view class='flex flex-direction flex-wrap align-center recordPrize_fd3_0_c0'>
							<text class='recordPrize_fd3_0_c0_c0'>提交成功</text>
							<text class='recordPrize_fd3_0_c0_c1'>发货申请提交成功，请耐心等待。如有疑问，可联系客服咨询。</text>
						</view>
						<view
							class='flex flex-direction flex-wrap align-center recordPrize_fd3_0_c1'
							@tap.stop="popupShow1679879191859=false"
						>
							<text class='recordPrize_fd3_0_c1_c0'>知道了</text>
						</view>
					</view>
				</view>

				<!---flex布局flex布局结束-->

			</benben-popup>


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import { validate } from '@/common/utils/validate.js'
	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return { "popupShow1679879191859": false, "popupShow1679879039621": false, "tabsInfofd1_0": { lineleft: '', lineWidth: '', moveX: 0, scrollX: 0,
	PageScrollX: 0 }, "minixPagingListsApi": "", "pageingListApiMethod": "", "allowOnloadGetList": false, "tabs": "0", "cut": "1", "dataMessage": [], "dataList": [], "shopinfo": { "id": "", "details_img": "", "details_name": "" }, "addressMessage": { "aid": "", "mobile": "", "label_name": "", "sex": "", "province_id": "", "is_default": "", "province": "", "city": "", "city_id": "", "district": "", "district_id": "", "create_time": "", "real_name": "", "address_code": "", "detail": "", "address_code_province": "", "address_code_city": "", "address_code_district": "", "lng": "", "lat": "", "address_code_area": "", "address_code_area_str": "" }, "address_id": "" };
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.diyPageListen()
		},
		onUnload() {
			this.diyOffPageListen()
		},
		onReady() {

		},
		onShow() {
			this.prizesRecordFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.prizesRecordFunc()
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取申请邮寄信息
			getShopinfoFunc(item) {
				this.shopinfo = item;
				this.popupShow1679879039621 = true;
			},
			//获取默认地址列表
			async getListFunc() {
				//请求方法
				//数据验证

				let datadataList = await this.$api.get(global.apiUrls.post636f7683cf195, {

				});

				if (datadataList.data.code != 1) {
					this.$message.info(datadataList.data.msg);
					return
				}
				let infodataList = datadataList.data.data;
				this.dataList = infodataList.data
				this.address_id = this.dataList[0].aid;
				this.addressMessage = this.dataList[0];
			},
			//申请邮寄
			async shenqingyoujiFunc() {
				//请求方法
				//数据验证

				let data641850c8714f7 = await this.$api.post(global.apiUrls.post641850c8714f7, {
					id: this.shopinfo.id,
					address_id: this.address_id
				});

				if (data641850c8714f7.data.code != 1) {
					this.$message.info(data641850c8714f7.data.msg);
					return
				}


				this.popupShow1679879039621 = false;
				this.popupShow1679879191859 = true;
			},
			//转盘抽奖-奖品记录
			prizesRecordFunc() {
				this.minixPagingListsApi = global.apiUrls.post64184ea084828;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = { type: this.tabs }
				this.listData = [];
				this.dataMessage = this.listData;
				this.pagingListToggle();
			},
			//获取地址
			async getAddressFunc() {
				//请求方法
				//数据验证

				let dataaddressMessage = await this.$api.get(global.apiUrls.post636fd7826b3ee, {
					address_id: this.address_id
				});

				if (dataaddressMessage.data.code != 1) {
					this.$message.info(dataaddressMessage.data.msg);
					return
				}
				let infoaddressMessage = dataaddressMessage.data;
				this.addressMessage = infoaddressMessage.data
			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			},
			//页面监听
			diyPageListen() {
				uni.$on('isokaddid', (data) => {
					this.address_id = data;
					this.getAddressFunc()
				});
			},
			//注销页面监听
			diyOffPageListen() {
				uni.$off('isokaddid');
			}
		}
	};
</script>
<style
	lang="scss"
	scoped
>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.recordPrize_flex_0 {
		border-bottom: 1px solid rgba(230, 230, 230, 1);
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.recordPrize_fd0_1 {
		color: #333333;
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
	}

	.recordPrize_fd0_0_c0 {
		width: 20rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}

	.recordPrize_fd0_0 {
		width: 100rpx;
		height: 88rpx;
	}

	.recordPrize_fd1_1_c0_c1_1 {
		border: 1px solid #999999;
		background: #fff;
		border-radius: 28rpx 28rpx 28rpx 28rpx;
		font-size: 28rpx;
		color: #333;
		width: 150rpx;
		height: 56rpx;
		line-height: 56rpx;
	}

	.recordPrize_fd1_1_c0_c1 {
		border: 1px solid #999999;
		background: #fff;
		border-radius: 28rpx 28rpx 28rpx 28rpx;
		font-size: 24rpx;
		color: #333;
		width: 150rpx;
		height: 56rpx;
		line-height: 54rpx;
	}

	.recordPrize_fd1_1_c0_c0_c1 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
	}

	.recordPrize_fd1_1_c0_c0_c0_c2 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
		margin: 0rpx 0rpx 0rpx 38rpx;
	}

	.recordPrize_fd1_1_c0_c0_c0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}

	.recordPrize_fd1_1_c0_c0_c0_c0 {
		color: #999999;
		font-size: 32rpx;
		font-weight: 400;
		line-height: 45rpx;
	}

	.recordPrize_fd1_1_c0_c0_c0 {
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.recordPrize_fd1_1_c0_c0 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.recordPrize_fd1_1 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.recordPrize_titleItemfd1_0_c3_c0 {
		font-size: 32rpx;
		font-weight: 400;
		line-height: 45rpx;
	}

	.recordPrize_linefd1_0 {
		background: var(--benbenbgColor7);
		width: 40rpx;
		height: 6rpx;
		top: 80rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx;
	}

	.checkTitlefd1_0 {
		font-weight: 700 !important;
		font-size: 32rpx !important;
		color: rgba(0, 142, 77, 1) !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .recordPrize_benbenTabsfd1_0 {
		background: #fff;
		width: 750rpx;
		height: 90rpx;
		white-space: nowrap;
		text-align: center;
	}

	.recordPrize_flex_2 {
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 0rpx 0rpx;
		padding: 40rpx 32rpx 32rpx 32rpx;
	}

	.recordPrize_fd2_3 {
		background: var(--benbenbgColor7);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		width: 686rpx;
		height: 80rpx;
		line-height: 80rpx;
		margin: 40rpx 0rpx 0rpx 0rpx;
	}

	.recordPrize_fd2_2_c1_c2 {
		width: 12rpx;
		height: 22rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.recordPrize_fd2_2_c1_c1_c1_c0 {
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
	}

	.recordPrize_fd2_2_c1_c1_c0_c5 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 39rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}

	.recordPrize_fd2_2_c1_c1_c0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.recordPrize_fd2_2_c1_c1_c0_c0_c0 {
		color: #698BFF;
		font-size: 24rpx;
		font-weight: 500;
		line-height: 33rpx;
	}

	.recordPrize_fd2_2_c1_c1_c0_c0 {
		border: 1px solid #698BFF;
		background: rgba(105, 139, 255, 0.08);
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		padding: 1rpx 16rpx 0rpx 16rpx;
	}

	.recordPrize_fd2_2_c1_c1_c0 {
		margin: 0rpx 0rpx 16rpx 0rpx;
	}

	.recordPrize_fd2_2_c1_c1 {
		margin: 0rpx 37rpx 0rpx 24rpx;
	}

	.recordPrize_fd2_2_c1_c0 {
		width: 60rpx;
		height: 60rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.recordPrize_fd2_2_c1 {
		border: 1px solid #EEEEEE;
		background: #FFFFFF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		padding: 32rpx 32rpx 27rpx 24rpx;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}

	.recordPrize_fd2_1_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
	}

	.recordPrize_fd2_1_c0 {
		width: 164rpx;
		height: 164rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.recordPrize_fd2_1 {
		padding: 48rpx 0rpx 48rpx 0rpx;
	}

	.recordPrize_fd2_0_c3 {
		width: 40rpx;
		height: 40rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: absolute;
		top: -10rpx;
		right: 0rpx;
	}

	.recordPrize_fd2_0_c1 {
		color: #333333;
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
		margin: 0rpx 24rpx 0rpx 24rpx;
	}

	.recordPrize_fd2_0_c0 {
		width: 32rpx;
		height: 10rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.recordPrize_fd2_0 {
		position: relative;
	}

	.recordPrize_flex_3 {
		padding: 0rpx 105rpx 0rpx 105rpx;
	}

	.recordPrize_fd3_0_c1_c0 {
		color: var(--benbenFontColor5);
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
	}

	.recordPrize_fd3_0_c1 {
		padding: 33rpx 0rpx 32rpx 0rpx;
	}

	.recordPrize_fd3_0_c0_c1 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 46rpx;
		text-align: center;
	}

	.recordPrize_fd3_0_c0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
		margin: 0rpx 0rpx 40rpx 0rpx;
	}

	.recordPrize_fd3_0_c0 {
		border-bottom: 1px solid rgba(238, 238, 238, 1);
		padding: 40rpx 30rpx 32rpx 30rpx;
	}

	.recordPrize_fd3_0 {
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
</style>